package com.keli.dt.model.rowmapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.keli.dt.model.TravelReport;

public class TravelReportRowMapper implements RowMapper {
	@Override
	public Object mapRow(ResultSet rs, int num) throws SQLException {
		// 对类进行封装
		TravelReport tr = new TravelReport();
		tr.setXLH(rs.getString("xlh"));
		tr.setSBBH(rs.getString("sbbh"));
		tr.setHPHM(rs.getString("hphm"));
		tr.setHPZL(rs.getString("hpzl"));
		tr.setCLBH(rs.getString("clbh"));
		tr.setGCSJ(rs.getString("strgcsj"));
		//tr.setGCSJ(rs.getDate("gcsj")); 时分秒不正确，全是0
		tr.setCLSD(rs.getString("clsd"));
		tr.setHPYS(rs.getString("hpys"));
		tr.setCLLX(rs.getString("cllx"));
		tr.setCDBH(rs.getString("cdbh"));
		tr.setDDBH(rs.getString("ddbh"));
		tr.setSECTIONID(rs.getString("SECTIONID"));
		tr.setDDMS(rs.getString("ddms"));
		tr.setSBLX(rs.getString("DETECT_CLASS"));
		return tr;
	}
}